home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Source ƒ / egrep-1.5 / README-for-sure < prev   
Encoding:
Text File  |  1991-10-20  |  8.7 KB  |  191 lines

  1.  
  2.                             GNU EGREP
  3.  
  4. Be warned, this program has known bugs.  I consider it useful as is but
  5. see "PROBLEMS" below.  It is probably of interest mostly to programmers
  6. or people who are familiar with egrep on UNIX systems.  This program
  7. is NOT public domain.  See "FSF COPYLEFT" below.  Do not contact the
  8. Free Software Foundation concerning Mac egrep.  I understand that they
  9. are boycotting Apple because of its stupid, offensive, and destructive
  10. position on software intellectual property rights.  If you have a
  11. purchasing alternative to Apple, take it.  That's my opinion anyway.
  12.  
  13. WHAT IS EGREP?
  14. ---- -- ------
  15.  
  16. Egrep is used to search for patterns (defined by regular expressions)
  17. in one or more files.  By default, lines that contain a match for the
  18. pattern are printed.  Click on help for assistance on regular expression
  19. syntax.  Features of this egrep include the following.
  20.  
  21. Ñ  Very complete regular expression syntax.
  22. Ñ  Lightning fast.  (That's why I ported it.)
  23. Ñ  File name globbing (within one folder).
  24. Ñ  Ability to save results to a file.
  25.  
  26. As an example, suppose you want to find the Apple .h files that contain
  27. the string "opendriver".  Use "opendriver" (without the quotes) as the
  28. regular expression, and use "*.h" (without the quotes) as the file name
  29. pattern.  Click on Pick folder to select the folder that contains the
  30. .h's.  Then, click on search.
  31.  
  32. UNIX users should be aware that there is no need to put the regular
  33. expression in single quotes.  Despite file globbing in the file
  34. pattern, there is no shell to mess with charactars like '\'.  For
  35. example, to search for an open paren, use regular expression "\("
  36. (but without the quotes).
  37.  
  38. See the manual file or the UNIX README for more clues.
  39.  
  40. PROBLEMS
  41. --------
  42.  
  43. I hesitated to make this program available since it is not really
  44. finished.  However, I decided not to work on it any longer and thought
  45. it might be useful to somebody.  Despite a number of bugs, I find it
  46. useful as is.  It is quite fast-- over 30 times faster than the grepper
  47. I used to use.  I guess my real hope is that someone with some spare
  48. time will pick it up and improve it.
  49.  
  50. My original intent was to test Think C by determining how hard it would
  51. be to compile egrep.  It was not very hard.  I added the simple Mac
  52. interface as an afterthought and without much planning.  It's a bit
  53. of a mess.  One problem is that egrep was not meant to be "restarted."
  54. On UNIX, you run one pattern, and egrep exits.  This is alien to the
  55. Mac way of doing things.  I made some small changes to make egrep
  56. restartable, but I believe there are memory leaks.
  57.  
  58. Here are some known problems.  I am sure there are more.
  59.  
  60. Ñ Default button (search) not outlined.
  61.  
  62. Ñ Will search non-TEXT files.  (Is this a bug or a feature?)
  63.  
  64. Ñ The method for stopping on command-period is really hoaky.  It
  65.   pretends to be out of input.  Sometimes, you have to hold down
  66.   command-period for a long time to get it to stop.
  67.  
  68. Ñ Should not force quit after a regexp parse error.
  69.  
  70. Ñ "Just one" file not implemented.  It's supposed to prompt the user
  71.   via SFGetFile for a file to search.
  72.   
  73. Ñ File names are case sensitive.
  74.  
  75. Ñ Ignore case does not work right.  You can set it ONCE before the first
  76.   search.  After that, leave it alone.
  77.  
  78. Ñ Needs HFS but does not check for it.
  79.  
  80. It was built with Think C 5.0.1.  It uses the 4 byte int option so
  81. the UNIX and ANSI libraries must be recompiled.
  82.  
  83. FSF COPYLEFT
  84. --- --------
  85.  
  86.    Copyright (C) 1988 Free Software Foundation, Inc.
  87.                       Written June, 1988 by Mike Haertel
  88.                   BMG speedups added July, 1988
  89.             by James A. Woods and Arthur David Olson
  90.  
  91.                NO WARRANTY
  92.  
  93.   BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
  94. NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.  EXCEPT
  95. WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
  96. RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
  97. WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  98. BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  99. FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY
  100. AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
  101. DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
  102. CORRECTION.
  103.  
  104.  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
  105. STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
  106. WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
  107. LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
  108. OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
  109. USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
  110. DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
  111. A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
  112. PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
  113. DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  114.  
  115.         GENERAL PUBLIC LICENSE TO COPY
  116.  
  117.   1. You may copy and distribute verbatim copies of this source file
  118. as you receive it, in any medium, provided that you conspicuously and
  119. appropriately publish on each copy a valid copyright notice "Copyright
  120.  (C) 1988 Free Software Foundation, Inc."; and include following the
  121. copyright notice a verbatim copy of the above disclaimer of warranty
  122. and of this License.  You may charge a distribution fee for the
  123. physical act of transferring a copy.
  124.  
  125.   2. You may modify your copy or copies of this source file or
  126. any portion of it, and copy and distribute such modifications under
  127. the terms of Paragraph 1 above, provided that you also do the following:
  128.  
  129.     a) cause the modified files to carry prominent notices stating
  130.     that you changed the files and the date of any change; and
  131.  
  132.     b) cause the whole of any work that you distribute or publish,
  133.     that in whole or in part contains or is a derivative of this
  134.     program or any part thereof, to be licensed at no charge to all
  135.     third parties on terms identical to those contained in this
  136.     License Agreement (except that you may choose to grant more extensive
  137.     warranty protection to some or all third parties, at your option).
  138.  
  139.     c) You may charge a distribution fee for the physical act of
  140.     transferring a copy, and you may at your option offer warranty
  141.     protection in exchange for a fee.
  142.  
  143. Mere aggregation of another unrelated program with this program (or its
  144. derivative) on a volume of a storage or distribution medium does not bring
  145. the other program under the scope of these terms.
  146.  
  147.   3. You may copy and distribute this program or any portion of it in
  148. compiled, executable or object code form under the terms of Paragraphs
  149. 1 and 2 above provided that you do the following:
  150.  
  151.     a) accompany it with the complete corresponding machine-readable
  152.     source code, which must be distributed under the terms of
  153.     Paragraphs 1 and 2 above; or,
  154.  
  155.     b) accompany it with a written offer, valid for at least three
  156.     years, to give any third party free (except for a nominal
  157.     shipping charge) a complete machine-readable copy of the
  158.     corresponding source code, to be distributed under the terms of
  159.     Paragraphs 1 and 2 above; or,
  160.  
  161.     c) accompany it with the information you received as to where the
  162.     corresponding source code may be obtained.  (This alternative is
  163.     allowed only for noncommercial distribution and only if you
  164.     received the program in object code or executable form alone.)
  165.  
  166. For an executable file, complete source code means all the source code for
  167. all modules it contains; but, as a special exception, it need not include
  168. source code for modules which are standard libraries that accompany the
  169. operating system on which the executable file runs.
  170.  
  171.   4. You may not copy, sublicense, distribute or transfer this program
  172. except as expressly provided under this License Agreement.  Any attempt
  173. otherwise to copy, sublicense, distribute or transfer this program is void and
  174. your rights to use the program under this License agreement shall be
  175. automatically terminated.  However, parties who have received computer
  176. software programs from you with this License Agreement will not have
  177. their licenses terminated so long as such parties remain in full compliance.
  178.  
  179.   5. If you wish to incorporate parts of this program into other free
  180. programs whose distribution conditions are different, write to the Free
  181. Software Foundation at 675 Mass Ave, Cambridge, MA 02139.  We have not yet
  182. worked out a simple rule that can be stated here, but we will often permit
  183. this.  We will be guided by the two goals of preserving the free status of
  184. all derivatives our free software and of promoting the sharing and reuse of
  185. software.
  186.  
  187.  
  188. In other words, you are welcome to use, share and improve this program.
  189. You are forbidden to forbid anyone else to use, share and improve
  190. what you give them.   Help stamp out software-hoarding!
  191.